package com.domain.beanutil;


public class XmlStringUntil {
	
	public static String getXmlStr(String xmlSource , String nodeStr){
		
		String xmlNodeStr = "<"+nodeStr+">";
		String xmlEndNodeStr = "</"+nodeStr+">";
		
		int startIndex = xmlSource.indexOf(xmlNodeStr)+xmlNodeStr.length();
		int endIndex = xmlSource.indexOf(xmlEndNodeStr);
		
		return xmlSource.substring(startIndex, endIndex);
	}
	
	public static String changNodeXML(String xmlSource , String nodeStr , String newNodeStr){
		String newXMLSource =  xmlSource.replaceAll(xmlSource,newNodeStr);
		return newXMLSource;
	}
}
